package com.tanker.order.api.impl;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tanker.order.api.OrderApi;
import com.tanker.order.dao.po.Order;
import com.tanker.order.dto.req.OrderCreateRequest;
import com.tanker.order.dto.resp.OrderDto;
import com.tanker.order.service.OrderService;
@Service
public class OrderApiImpl implements OrderApi {
	@Autowired
	private OrderService orderService;

	public OrderDto create(OrderCreateRequest request) {
		Order order = new Order();
		BeanUtils.copyProperties(request, order);
		orderService.create(order);
		return new OrderDto();
	}
	
}
